package com.java1234.web;

import java.io.IOException;
import java.sql.Connection;
import java.util.List;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.java1234.dao.FundDao;

import com.java1234.util.DbUtil;

public class FundServlet extends HttpServlet {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	DbUtil dbUtil = new DbUtil();
	FundDao fundDao = new FundDao();


	@Override
	protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
		this.doPost(req, resp);
	}

	@Override
	protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
		req.setCharacterEncoding("utf-8");
		String action = req.getParameter("action");
		if ("fundlist".equals(action)) {
			this.fundList(req, resp);
		}

	}

	private void fundList(HttpServletRequest req, HttpServletResponse resp) {
		Connection con = null;
		try {
			/**
			 * 鑾峰緱鎺ㄨ崘鍒楄〃
			 */
			con = dbUtil.getCon();
			
	}catch (Exception e) {
		// TODO: handle exception
	}
	}
	
}
